<?php

if (!defined('TS_ROOT')) die(basename(__FILE__));

global $ts_cfg;

// Blog news not show index
if($ts_cfg['blog_enabled'])
{
	$blog_count = max($ts_cfg['blog_max_count_show'], 1);
	
	$data = DB()->fetch_rowset("
			SELECT blog_id, blog_title, blog_poster, blog_time 
			FROM ". TS_BLOGS ." 
			WHERE show_blog_of_index = 0 
			ORDER BY blog_time
			LIMIT $blog_count
	");
	
	$this->store('blog_show', $data);
}	